#!/usr/bin/env python
import pdb
pdb.set_trace()

import string
import killmailmodel
import killmailreader
import killmailpreprocessor
import killmailparser


kmm = killmailmodel.playermodel.PlayerModel("klaus", "1.0", "hasen hopfer", "hasen hopfer allianz", "amarr", "capsule", "peters gun", "1209812")
print kmm.View()

kmr = killmailreader.KillmailReader()
kmr.Open("1231243dasf21.rekm")
print kmr.GetRawData()
print len(kmr.GetRawData())
kmpp = killmailpreprocessor.KillmailPreProcessor(kmr.GetRawData())
kmpp.Process()
kmp = killmailparser.KillmailParser(kmpp.killmail)

if kmpp.isProcessed():
    pdb.set_trace()
    print kmpp.killmail
    print
    print
    print "Starting to map Killmail to the KillmailModel"
    kmp.AddEmptyModel()
    kmp.AddDate()
    kmp.AddVictim()
    kmp.AddInvolvedParties()
    print kmp.model.View() 
    
    
else:
    print "NO PROCESS COULD BE ESTABLISH NOR FINISHED"

raw_input()